<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>常用工具_信贷一站通</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link href="../favicon.ico" rel="shortcut icon" />

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<!--App自定义的css-->
		<link rel="stylesheet" type="text/css" href="../css/app.css" />
		<style>
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">常用工具</h1> 
		</header> 
		<div class="mui-content">
				<!-- <div class="title">
				缩略图居左
			</div> -->
			<ul id="newsList" class="mui-table-view mui-table-view-chevron">
				<!-- <li class="mui-table-view-cell mui-media">
				<a class="mui-navigate-right">
					<img class="mui-media-object mui-pull-left" src="../images/cbd.jpg">
					<div class="mui-media-body">
						CBD
						<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
					</div>
				</a>
			</li> -->
			</ul>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/jquery-3.3.1.min.js"></script>
	<script src="../js/frame-utils.min.js"></script>
	<script src="../js/frame-setting.min.js?v=004"></script>
	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		var url = serverUrl + commonToolsApi;
		//console.log(url);
		//页面初始化
		mui.ready(loadList);

		//加载列表
		function loadList() {
			get(url, null, function(rsp) {
				//console.log(rsp)
				if (!rsp.status) {
					mui.alert(rsp.msg, '提示', function() {});
					return;
				}
				$(".mui-title").html(rsp.channel);
				$("#newsList").empty();

				mui.each(rsp.data, function(index, link) {
					var html = "<li class=\"mui-table-view-cell mui-media\">" +
						"	<a href=\"javascript:;\" class='mui-navigate-right' url=\"" + link.url +
						"\" linkName=\"" + link.linkName + "\">" +
						"		<img class=\"mui-media-object mui-pull-left\" src=\"" + link.linkImg + "\" />" +
						"		<div class=\"mui-media-body\" style='margin-top: 10px;'>" +
						"			" + link.linkName + " " +
						//"			<p class='mui-ellipsis'>" + link.linkName + " </p>" +
						"		</div>" +
						"	</a>" +
						"</li>";
					$("#newsList").append(html);
				});
				//详情
				showDetail();
			});
		}

		function showDetail() {
			mui(".mui-table-view-cell").on('tap', 'a', function() {
				var url = this.getAttribute("url");
				openPage("LinkShow", url);
			});
		}
	</script>
</html>
